<?
/**
 * Testing spellchecker functionality
 */
require_once('Database.php');
require_once('ArtistLexica.php');
echo "<pre>";
$sc = new ArtistLexica();
var_dump($sc->getArtistName("Au"));
Info::display();

/** FOR automatic insertion of cached artists (eg. files)
$path = '../cache/';
if ($handle = opendir($path)) {
    echo "Directory handle: $handle<br>";
    echo "Files:<br>";

    while (false !== ($file = readdir($handle))) {
        if(is_dir($path . $file) == false) {
        	$sql = "INSERT INTO `musiceye`.`artists` (
					`id` ,
					`artistName` ,
					`cached` ,
					`cachedat`
					)
					VALUES (
					NULL , '" . urldecode($file) . "', 'true', NOW()
			)";
        	$db->query($sql);
        	echo "added: " . urldecode($file) . "<br>";
        }
    }

    closedir($handle);
}
*/
